const path = require('path')

module.exports = function(){
	const { dev } = this.command
	if(dev){ return { protocol: '', base: '/' } }
	const { virtualHost = '', workspace = '' } = this.userEnvConf
	const [origin, protocol = '', host = ''] = virtualHost.match(/^(http:\/\/|https:\/\/)(.*)$/)
	return { root: protocol, base: path.posix.join(host, workspace) }
}